export default function request(obj) {
	return new Promise((resolve, reject) => {
		let {
			method,
			url,
			data
		} = { ...obj
		};
		let header = obj.header || {
			'Content-Type': obj.contentType || 'application/x-www-form-urlencoded'
		};
		uni.request({
			url: url,
			data: data,
			header: header,
			method: method,
			success: (res) => {
				resolve(res.data)
			},
			fail: (err) => {
				reject(err)
			}
		})
	})
}
